Skip to main content

Webhook: Failure

  • Webhooks facilitate real-time communication and integration within the edeXa platform. When adding a stamp encounters errors, webhook failure responses provide crucial information. This article explores the structure, significance, and strategies for handling these failures.
  • If no response is received from webhook, bstamp-edeXa will resend the request several more times, the retry schedule (in seconds) is 300, 1800, 3600, 21600 and 86400.

Understanding the Webhook Failure Response

After successfully adding a stamp, the webhook failure response contains vital information:

info
Failed Webhook Details
Webhook Response
{
"actionId": "6475b0af7195267fd13bb3d1",
"action": "failed",
"data": {
"_id": "6475d6153b1b98c0686866cd",
"userId": "646f1d74d3397a4b57dbe194",
"clientId": "2",
"name": "abc.png",
"hash": "6d6db6agfgdfgffggffgggsg1ed",
"type": "0",
"code": "fd43g8",
"isEsign": false,
"isPrivateBc": false,
"status": 2,
"createdAt": "2023-05-30T10:55:17.315Z",
"updatedAt": "2023-05-30T10:55:20.142Z"
},
"webhookId": "6475d6183b1b98c0686866d5"
}
Details about webhook response perameters
KeyValueTypeDescription
webhookId6475d6183b1b98c0686866d5StringAn webhoook id, generated corrospond to webhook
actionId6475a47ed251164c916a830eStringAn action id, generated corrospond to webhook
actionfailedStringAction type of webhook, details are:
    failed : When webhook unable to provied txId corrospond to stamped file.
    succeed : When webhook successfully returns txId of stamped file.
_id6475c02029b5bab6d2f2c6dcStringThe id generated for stamped hash or file
userId646f1d74d3397a4********StringId of user, who is stampin file
clientId2StringId of user, who is stampin file
nameabc.pngStringId of user, who is stampin file
blockchainId2d4cf0b1-a3ee-4580-97f4-86bf937190feStringBlockchain id corrospond to stamped file. generated from blockchain side
txId0x3b7d586651f386c0d415fa1349b9ec0be07b78c86StringTransaction id corrospond to hash, used for stamping
hash6d6db6c12243mdhfrehrdfghju76StringAn string which user want to stamp
type0StringThe id generated for stamped hash or file
codebd5c9eStringAn short code, generated with respect to stamped hash
isPrivateBcfalseBooleanType of blockchain, on which hash is stamped
    true: For Private Blockchain
    false: For Public Blockchain
status1NumberCurrent status of stamped hash, returned from webhook. Deatils about status are:
    0: Waiting for the response to be received and processed
    1: Response received successfully, indicating a successful operation
    2: Response received with an error or unsuccessful outcome
createdAt2023-05-30T09:21:36.966ZDateTimestamp when hash stamped
updatedAt2023-05-30T09:21:36.966ZDateLast updated time stamp

Conclusion

Webhook failure responses provide insights into add stamp errors in the edeXa platform. By understanding these responses and implementing effective handling strategies, developers can ensure smooth integration and reliable stamp addition functionality.


🖖 Become a part of bStamp community

Connect and get the latest updates of bStamp : bStamp Discord